package com.wumao.service;

import com.wumao.mapper.UserMapper;
import com.wumao.pojo.User;
import com.wumao.util.MD5Utils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Gaowumao
 * @Decripted
 * @Email none-j@qq.com
 * @create 2021-04-15 11:03
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    UserMapper userMapper;

    @Override
    public User checkUser(String username, String password) {
        return userMapper.queryUserByUsernameAndPassword(username, MD5Utils.code(password));
    }
}
